import request from "@/utils/request";

// 查询收款列表
export function listCsmReceiveM(query) {
  return request({
    url: "/machine/csmReceiveM/list",
    method: "get",
    params: query,
  });
}

// 查询收款详细
export function getCsmReceiveM(id) {
  return request({
    url: "/machine/csmReceiveM/" + id,
    method: "get",
  });
}

// 新增收款
export function addCsmReceiveM(data) {
  return request({
    url: "/machine/csmReceiveM",
    method: "post",
    data: data,
  });
}

// 修改收款
export function updateCsmReceiveM(data) {
  return request({
    url: "/machine/csmReceiveM",
    method: "put",
    data: data,
  });
}

// 删除收款
export function delCsmReceiveM(id) {
  return request({
    url: "/machine/csmReceiveM/" + id,
    method: "delete",
  });
}

// 查询收款单号
export function getReceiveDocumentNo() {
  return request({
    url: "/machine/csmReceiveM/getReceiveDocumentNo",
    method: "get",
  });
}

// 查询应收欠款金额
export function getReceivePriceByCustomer(query) {
  return request({
    url: "/machine/csmReceiveM/getReceivePriceByCustomer",
    method: "get",
    params: query,
  });
}

// 审核
export function auditReceiveM(data) {
  return request({
    url: "/machine/csmReceiveM/audit",
    method: "put",
    data: data,
  });
}
